import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);

//初始状态
const state = {
	appName: '美艺天',
	bottomNav: 'task',
	infoType: '个人信息',
	curDate: moment(new Date()).format('YYYY-MM-DD'),
	taskLevel: ['普通', '重要', '紧急'],	//任务紧急程度
	taskLevelColor: ['#81d4fa', '#d500f9', '#d50000'],	//任务紧急色彩
	taskStatusColor: ['#eee', '#c00', '#F7BA2A', 'green'],	//任务状态色彩
	userInfo: {},	//用户信息
	userList: [],	//用户列表
	examineListen: 1,	//审核弹窗状态监听
}

const mutations = {
	setAppName (state, val) {
		state.appName = val;
	},
	setBottomNav(state, val) {
		state.bottomNav = val;
	},
	setInfoType(state, val) {
		state.infoType = val;
	},
	taskType(state, val){
		state.taskType = val;
	},
	examineListen(state, val){
		state.examineListen++;
	},
	change(state, val){
		state.appName = val
	}
}

export default new Vuex.Store({
	state,
	mutations
});
